package com.itheima.task.test;

import org.junit.Test;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class BcryptDemo {

    @Test
    public void testGen(){

        BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();

        for (int i = 0; i < 10; i++) {
            String encode = passwordEncoder.encode("123456");
            System.out.println(encode);
        }

//        boolean matches = passwordEncoder.matches("123456", "$2a$10$zp7qYDCT9oSqDWvqFWnI2e7/vj2dXbuR8ef0djHPoSH7qmGcPYr2y");
//        System.out.println(matches);

    }

}
